﻿using System.Xml.Linq;
using unTroublemaker.Conditions;

namespace unTroublemaker.Parsing
{
    public class FileExistsConditionParser : ISpecificationParser
    {
        public ISpecificationItem Parse(XElement element, ISpecificationParser genericParser)
        {
            var path = (string) element.Attribute("path");
            return new FileExistsCondition(path);
        }

        public string ElementName { get { return "check-file-exists"; } }
    }
}
